Create the passenger assignment setup for a route.
Rate limit: 100 requests/min (learn more about rate limits here).
To use this endpoint, select Write Ridership under the Ridership category when creating or editing an API token. Learn More.
Submit Feedback: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team.
curl --request POST \
--url https://api.samsara.com/ridership/route-setups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accountId": "e4b2c3a5-7d6f-4e8b-9a0c-1b2d3e4f5a6b",
"passengers": [
{
"passengerId": "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"dropOffStopId": "790",
"pickUpStopId": "789"
}
],
"routeId": "123456"
}
'{
"data": {
"accountId": "e4b2c3a5-7d6f-4e8b-9a0c-1b2d3e4f5a6b",
"createdAtTime": "2024-11-15T10:00:00Z",
"passengers": [
{
"passengerId": "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"dropOffStopId": "790",
"pickUpStopId": "789"
}
],
"routeId": "123456",
"updatedAtTime": "2024-11-15T10:30:00Z"
}
}Documentation Index
Fetch the complete documentation index at: https://samsara-showcase.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The Samsara UUID of the ridership account.
"e4b2c3a5-7d6f-4e8b-9a0c-1b2d3e4f5a6b"
List of passenger assignments for the route.
Show child attributes
The route ID. This is the Samsara route ID returned by the Routing API.
"123456"
OK response.
A ridership route setup representing planned passenger assignments.
Show child attributes
curl --request POST \
--url https://api.samsara.com/ridership/route-setups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accountId": "e4b2c3a5-7d6f-4e8b-9a0c-1b2d3e4f5a6b",
"passengers": [
{
"passengerId": "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"dropOffStopId": "790",
"pickUpStopId": "789"
}
],
"routeId": "123456"
}
'{
"data": {
"accountId": "e4b2c3a5-7d6f-4e8b-9a0c-1b2d3e4f5a6b",
"createdAtTime": "2024-11-15T10:00:00Z",
"passengers": [
{
"passengerId": "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"dropOffStopId": "790",
"pickUpStopId": "789"
}
],
"routeId": "123456",
"updatedAtTime": "2024-11-15T10:30:00Z"
}
}